mtd: Disable slram and phram when securelevel is enabled
authorBen Hutchings <ben@decadent.org.uk>
Thu, 2 Jun 2016 23:48:39 +0000 (00:48 +0100)
committerYves-Alexis Perez <corsac@debian.org>
Fri, 9 Feb 2018 12:58:52 +0000 (12:58 +0000)
commit0f3c730c1515a6253582fb5c0d223d1cf64941ae
tree0d6f43bf103eedec8db99eb9d45d72468bfca84e
parentf449faf449491e6d3885bbeeaf0a0ce7525e6cf7
mtd: Disable slram and phram when securelevel is enabled

The slram and phram drivers both allow mapping regions of physical
address space such that they can then be read and written by userland
through the MTD interface.  This is probably usable to manipulate
hardware into overwriting kernel code on many systems.  Prevent that
if securelevel is set.

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Gbp-Pq: Topic features/all/securelevel
Gbp-Pq: Name mtd-disable-slram-and-phram-when-securelevel-is-enabled.patch
drivers/mtd/devices/phram.c
drivers/mtd/devices/slram.c